<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Data-Table 表格</title>
    <link rel="stylesheet" href="/web/layui/css/layui.css">
    <link rel="stylesheet" href="/web/static/css/style.css">
    <link rel="stylesheet" href="/web/static/css/admin_list.css">
    <link rel="icon" href="/web/static/image/code.png">
</head>
<body class="body">

<!-- 工具集 -->
<div class="my-btn-box">
    <span class="fl">
        <a class="layui-btn btn-add btn-default" id="btn-add">添加管理员</a>

    </span>
    <span class="fr">
        <form class="layui-form" action="" onclick="return false">

            <div class="layui-form-item">
                {{--<div class="layui-inline" id="search_status">--}}
                    {{--<label class="layui-form-label">状态</label>--}}
                    {{--<div class="layui-input-block">--}}
                        {{--<select  name="frozen_flag">--}}
                            {{--<option value="">-请选择-</option>--}}
                            {{--<option value="0">正常</option>--}}
                            {{--<option value="1">冻结</option>--}}

                        {{--</select>--}}
                    {{--</div>--}}
                {{--</div>--}}

                <div class="layui-inline">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-inline">
                        <input type="text" name="username" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-inline">
                    <label class="layui-form-label">开始日期</label>
                    <div class="layui-input-inline">
                        <input type="text" name="start_date" id="start_date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">结束日期</label>
                    <div class="layui-input-inline">
                        <input type="text" name="end_date" id="end_date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <button class="layui-btn search" lay-submit lay-filter="search">查询</button>
                <button type="reset" class="layui-btn layui-btn-primary clear">清空</button>
                {{--<button class="layui-btn layui-btn-normal download" lay-submit lay-filter="download">导出Excel</button>--}}

            </div>
        </form>

    </span>
</div>

<!-- 表格 -->
<div id="dateTable">

    <table class="layui-table" id="admin_data" lay-filter="admin_data"></table>

</div>


<!-- 表格操作按钮集 -->
<script type="text/html" id="barOption">

    {{--<a class="layui-btn layui-btn-mini layui-btn-default tool-btn" lay-event="update">修改</a>--}}
    <a class="layui-btn layui-btn-mini layui-btn-danger tool-btn frozen" lay-event="del">删除</a>
</script>

</body>

<!-- 添加管理员-->

<input type="hidden" name="_token" id="_token" value="<?php echo csrf_token(); ?>">
<div class="add_admin" >
    <form class="layui-form max-auto" action="" onclick="return false">
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-block">
                <input type="text" name="username" required lay-verify="required" autocomplete="off" class="layui-input" placeholder="请输入用户名">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="password" name="password" required lay-verify="required"
                        autocomplete="off" class="layui-input">
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">管理员类型</label>
            <div class="layui-input-block">
                <input type="radio" name="role" value="1" title="超级管理员" checked>
                <input type="radio" name="role" value="2" title="普通管理员" >
                <input type="radio" name="role" value="3" title="客服" >
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea name="remark" placeholder="请输入内容" class="layui-textarea"></textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="add_admin">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary layui-layer-close">取消</button>
            </div>
        </div>
    </form>
</div>

<!-- 修改管理员状态-->
<div class="admin_update">
    <form class="layui-form max-auto" action="" onclick="return false">
        <input type="hidden" name="u_id" id="u_id" value="">
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="radio" name="frozen_flag" value="1" title="禁用" >
                <input type="radio" name="frozen_flag" value="0" title="正常" >
                {{--<input type="radio" name="status" value="0" title="下线" >--}}
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-small" lay-submit lay-filter="acc_update">确定</button>
                <button type="reset" class="layui-btn layui-btn-mini layui-btn-primary layui-layer-close">取消</button>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript" src="/web/layui/layui.js"></script>
<script type="text/javascript" src="/web/index.js"></script>
<script type="text/javascript" src="/web/static/js/admin/admin_list.js"></script>

</html>